<template>
  <!--  表格顶部-->
  <div class="form-head">
    <div class="head-left">
      <slot name="headLeft">
        <div></div>
      </slot>
    </div>
    <div class="head-right">
      <slot name="headRight">
        <div class="right-row">
          <el-input
            v-model="searchVal"
            placeholder="请输入内容"
            prefix-icon="el-icon-search"
            size="small"
          />
          <el-button size="small" type="primary" @click="searchSubmit">搜索</el-button>
        </div>
      </slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'FormHead',
  data() {
    return {
      searchVal: '6'
    }
  },
  methods: {
    searchSubmit() {
      this.$emit('searchSubmit', this.searchVal)
    }
  }
}
</script>

<style scoped lang="scss">
.form-head{
 display: flex;
  justify-content: space-between;
  .head-right{
    .right-row{
      display: flex;
      button{
        margin-left: 10px;
      }
    }
  }
  padding-bottom: 20px;
}
</style>
